package com.ruoyi.lease.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lease.mapper.LeaseMapper;
import com.ruoyi.lease.domain.Lease;
import com.ruoyi.lease.service.ILeaseService;

/**
 * 租房类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-12
 */
@Service
public class LeaseServiceImpl implements ILeaseService 
{
    @Autowired
    private LeaseMapper leaseMapper;

    /**
     * 查询租房类型
     * 
     * @param id 租房类型主键
     * @return 租房类型
     */
    @Override
    public Lease selectLeaseById(Long id)
    {
        return leaseMapper.selectLeaseById(id);
    }

    /**
     * 查询租房类型列表
     * 
     * @param lease 租房类型
     * @return 租房类型
     */
    @Override
    public List<Lease> selectLeaseList(Lease lease)
    {
        return leaseMapper.selectLeaseList(lease);
    }

    /**
     * 新增租房类型
     * 
     * @param lease 租房类型
     * @return 结果
     */
    @Override
    public int insertLease(Lease lease)
    {
        return leaseMapper.insertLease(lease);
    }

    /**
     * 修改租房类型
     * 
     * @param lease 租房类型
     * @return 结果
     */
    @Override
    public int updateLease(Lease lease)
    {
        return leaseMapper.updateLease(lease);
    }

    /**
     * 批量删除租房类型
     * 
     * @param ids 需要删除的租房类型主键
     * @return 结果
     */
    @Override
    public int deleteLeaseByIds(Long[] ids)
    {
        return leaseMapper.deleteLeaseByIds(ids);
    }

    /**
     * 删除租房类型信息
     * 
     * @param id 租房类型主键
     * @return 结果
     */
    @Override
    public int deleteLeaseById(Long id)
    {
        return leaseMapper.deleteLeaseById(id);
    }
}
